﻿<UserControl x:Class="Neurotoxin.Godspeed.Shell.Views.FileListPane" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:e="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:inf="clr-namespace:Neurotoxin.Godspeed.Presentation.Infrastructure;assembly=Neurotoxin.Godspeed.Presentation"
             xmlns:controls="clr-namespace:Neurotoxin.Godspeed.Presentation.Controls;assembly=Neurotoxin.Godspeed.Presentation"
             xmlns:vc="clr-namespace:Neurotoxin.Godspeed.Shell.Views.Controls"
             xmlns:constants="clr-namespace:Neurotoxin.Godspeed.Shell.Constants" 
             xmlns:s="clr-namespace:Neurotoxin.Godspeed.Shell.Views.Selectors"
             xmlns:lex="http://wpflocalizeextension.codeplex.com"
             lex:LocalizeDictionary.DesignCulture="en-US"
             lex:ResxLocalizationProvider.DefaultAssembly="Neurotoxin.Godspeed.Shell"
             lex:ResxLocalizationProvider.DefaultDictionary="Resources"
             Background="Transparent">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Themes/WhistlerBlue.xaml" />                
                <ResourceDictionary>
                    <inf:BindingProxy x:Key="ViewModel" Data="{Binding}" />
                    <constants:OpenStfsPackageMode x:Key="Browsing">Browsing</constants:OpenStfsPackageMode>
                    <constants:OpenStfsPackageMode x:Key="Repair">Repair</constants:OpenStfsPackageMode>
                    <s:CloseButtonsTemplateSelector x:Key="CloseButtonsTemplateSelector">
                        <s:CloseButtonsTemplateSelector.DefaultTemplate>
                            <DataTemplate>
                                <StackPanel />
                            </DataTemplate>
                        </s:CloseButtonsTemplateSelector.DefaultTemplate>
                        <s:CloseButtonsTemplateSelector.FtpTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Button Content="{lex:LocText Disconnect}" Command="{Binding CloseCommand}" MinWidth="75" Padding="10,0,10,0" />
                                </StackPanel>
                            </DataTemplate>
                        </s:CloseButtonsTemplateSelector.FtpTemplate>
                        <s:CloseButtonsTemplateSelector.PackageTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <!--<Button Content="{lex:LocText SaveAndClose}" Command="{Binding SaveAndCloseCommand}" Margin="0,0,3,0" MinWidth="100" Padding="10,0,10,0" />-->
                                    <Button Content="{lex:LocText Close}" Command="{Binding CloseCommand}" MinWidth="60" Padding="10,0,10,0" />
                                </StackPanel>
                            </DataTemplate>
                        </s:CloseButtonsTemplateSelector.PackageTemplate>
                        <s:CloseButtonsTemplateSelector.CompressedFileTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal">
                                    <Button Content="{lex:LocText Close}" Command="{Binding CloseCommand}" MinWidth="60" Padding="10,0,10,0" />
                                </StackPanel>
                            </DataTemplate>
                        </s:CloseButtonsTemplateSelector.CompressedFileTemplate>
                    </s:CloseButtonsTemplateSelector>
                    <s:CellEditingTemplateSelector x:Key="CellEditingTemplateSelector">
                        <s:CellEditingTemplateSelector.TitleTemplate>
                            <DataTemplate>
                                <Grid Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Source="{Binding Thumbnail}" Width="16" Height="16" Margin="2,0,3,0" />
                                    <Grid Grid.Column="1" x:Name="TitleEditCanvas">
                                        <TextBox x:Name="TitleEditBox" Margin="0,-2" Height="20" Text="{Binding Title, UpdateSourceTrigger=LostFocus}"
                                                 FontWeight="Bold" Loaded="TitleEditBoxLoaded" />
                                    </Grid>
                                </Grid>
                            </DataTemplate>
                        </s:CellEditingTemplateSelector.TitleTemplate>
                        <s:CellEditingTemplateSelector.NameTemplate>
                            <DataTemplate>
                                <Grid Background="Transparent">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="*" />
                                    </Grid.ColumnDefinitions>
                                    <Image Grid.Column="0" Source="{Binding Thumbnail}" Width="16" Height="16" Margin="2,0,3,0" />
                                    <Grid Grid.Column="1" x:Name="TitleEditCanvas">
                                        <TextBox x:Name="TitleEditBox" Margin="0,-2" Height="20" Text="{Binding Name, UpdateSourceTrigger=LostFocus}"
                                                 FontWeight="Bold" Loaded="TitleEditBoxLoaded" />
                                    </Grid>
                                </Grid>
                            </DataTemplate>
                        </s:CellEditingTemplateSelector.NameTemplate>
                    </s:CellEditingTemplateSelector>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0" Margin="0,2,0,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <ComboBox Grid.Column="0" ItemsSource="{Binding Drives}" SelectedItem="{Binding Drive}" Margin="0,0,3,0" x:Name="DriveDropdown">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <DockPanel>
                            <Image DockPanel.Dock="Left" Width="16" Height="16" Source="{Binding Thumbnail}" />
                            <TextBlock Text="{Binding Name}" Margin="3,0,0,0" />
                        </DockPanel>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
                <e:Interaction.Triggers>
                    <e:EventTrigger EventName="PreviewKeyDown">
                        <inf:MapKeyboardEventToCommand Command="{Binding SelectDriveByInitialLetterCommand}" />
                    </e:EventTrigger>
                </e:Interaction.Triggers>
            </ComboBox>
            <TextBlock Grid.Column="1" Text="{Binding DriveLabel}" FontWeight="Bold" VerticalAlignment="Center" Margin="0,0,5,0" />
            <TextBlock Grid.Column="2" Text="{Binding FreeSpaceText}" VerticalAlignment="Center" Visibility="{Binding FreeSpaceText, Converter={StaticResource NotNullOrEmptyConverter}, FallbackValue=Collapsed}" />
            
            <ContentControl Grid.Column="2" HorizontalAlignment="Right" Content="{Binding}" ContentTemplateSelector="{StaticResource CloseButtonsTemplateSelector}" />
        </Grid>

        <Border Grid.Row="1" 
                Background="{Binding Path=IsActive, Converter={StaticResource PaneHeaderBackgroundConverter}}"
                BorderBrush="{StaticResource NormalBorderBrush}" 
                BorderThickness="1,1,1,0" 
                SnapsToDevicePixels="True">
            <TextBlock Text="{Binding CurrentFolder.Path}" Padding="2" FontWeight="Bold" />
        </Border>
        
        <DataGrid x:Name="Grid"
                  Grid.Row="2" 
                  ItemsSource="{Binding Items}" 
                  SelectedItem="{Binding CurrentRow}"
                  AutoGenerateColumns="False" 
                  IsTextSearchEnabled="True" 
                  IsTextSearchCaseSensitive="False"
                  TextSearch.TextPath="ComputedName" 
                  Background="White" 
                  SelectionMode="Single" 
                  GridLinesVisibility="None"
                  CanUserAddRows="False" 
                  CanUserReorderColumns="False"
                  CanUserDeleteRows="False" 
                  CanUserResizeRows="False"
                  CanUserResizeColumns="True" 
                  CanUserSortColumns="True" 
                  SelectionUnit="FullRow" 
                  Focusable="False"
                  ClipboardCopyMode="None" 
                  BorderBrush="{StaticResource NormalBorderBrush}">
            <DataGrid.Columns>
                <DataGridTemplateColumn Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:Name}" SortMemberPath="ComputedName" Width="*" IsReadOnly="True" 
                                        CellEditingTemplateSelector="{StaticResource CellEditingTemplateSelector}" CellTemplate="{StaticResource FileSystemItemTitleTemplate}"/>
                <DataGridTextColumn Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:Size}" SortMemberPath="ComputedSize" Width="80" IsReadOnly="True">
                    <DataGridTextColumn.Binding>
                        <MultiBinding Converter="{StaticResource SizeConverter}">
                            <Binding Path="Size" />
                            <Binding Path="Type" />
                            <Binding Path="TitleType" />
                            <Binding Path="IsRefreshing" />
                        </MultiBinding>
                    </DataGridTextColumn.Binding>
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="HorizontalAlignment" Value="Right" />
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsSelected}" Value="True">
                                    <Setter Property="Foreground" Value="Red" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding Size}" Value="{x:Null}">
                                    <Setter Property="HorizontalAlignment" Value="Left" />
                                </DataTrigger>
                                <DataTrigger Binding="{Binding IsRefreshing}" Value="{StaticResource True}">
                                    <Setter Property="HorizontalAlignment" Value="Center" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
                <DataGridTextColumn Binding="{Binding Path=Date, StringFormat={lex:LocText Neurotoxin.Godspeed.Shell:Resources:DateTimeFormat}}"
                                    Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:Date}" SortMemberPath="Date" Width="100" IsReadOnly="True">
                    <DataGridTextColumn.ElementStyle>
                        <Style TargetType="TextBlock">
                            <Setter Property="HorizontalAlignment" Value="Right" />
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsSelected}" Value="True">
                                    <Setter Property="Foreground" Value="Red" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </DataGridTextColumn.ElementStyle>
                </DataGridTextColumn>
            </DataGrid.Columns>
            <DataGrid.RowStyle>
                <Style TargetType="DataGridRow">
                    <Setter Property="ContextMenu">
                        <Setter.Value>
                            <ContextMenu>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:RecognizeAgain}" Command="{Binding Source={StaticResource ViewModel}, Path=Data.RefreshTitleCommand}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/refresh.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:RecognizeTitlesFromProfile}"
                                          Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.CurrentRow.IsProfile, Converter={StaticResource BoolToVis}, FallbackValue=Collapsed}"
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.RecognizeFromProfileCommand}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/cog.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:LaunchGame}" 
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.LaunchCommand}">
                                    <MenuItem.Visibility>
                                        <MultiBinding Converter="{StaticResource BoolToVis}" FallbackValue="Collapsed">
                                            <Binding Source="{StaticResource ViewModel}" Path="Data.CurrentRow.IsGame"/>
                                            <Binding Source="{StaticResource ViewModel}" Path="Data.LaunchCommand"/>
                                        </MultiBinding>
                                    </MenuItem.Visibility>
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/control_play.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:LaunchXex}" 
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.LaunchCommand}">
                                    <MenuItem.Visibility>
                                        <MultiBinding Converter="{StaticResource BoolToVis}" FallbackValue="Collapsed">
                                            <Binding Source="{StaticResource ViewModel}" Path="Data.CurrentRow.IsXex"/>
                                            <Binding Source="{StaticResource ViewModel}" Path="Data.LaunchCommand"/>
                                        </MultiBinding>
                                    </MenuItem.Visibility>
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/control_play.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:OpenProfile}" 
                                          Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.CurrentRow.IsProfile, Converter={StaticResource BoolToVis}, FallbackValue=Collapsed}"
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.OpenStfsPackageCommand}"
                                          CommandParameter="{StaticResource Browsing}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/package.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <!--<MenuItem Header="{lex:Loc Neurotoxin.Godspeed.Shell:Resources:RepairProfile}" 
                                          Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.CurrentRow.IsProfile, Converter={StaticResource BoolToVis}, FallbackValue=Collapsed}"
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.OpenStfsPackageCommand}" CommandParameter="{StaticResource Repair}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/package.png" Width="16" Height="16" SnapsToDevicePixels="True"/>
                                    </MenuItem.Icon>
                                </MenuItem>-->
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:CopyTitleIDtoClipboard}"
                                          Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.CurrentRow.IsGame, Converter={StaticResource BoolToVis}, FallbackValue=Collapsed}"
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.CopyTitleIdToClipboardCommand}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/clipboard_sign.png" Width="16" Height="16"
                                             SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:SearchGoogle}"
                                          Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.CurrentRow.IsGame, Converter={StaticResource BoolToVis}, FallbackValue=Collapsed}"
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.SearchGoogleCommand}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/search.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:SaveThumbnailAs}"
                                          Visibility="{Binding Source={StaticResource ViewModel}, Path=Data.CurrentRow.HasThumbnail, Converter={StaticResource BoolToVis}, FallbackValue=Collapsed}"
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.SaveThumbnailCommand}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/savethumbnail.png" Width="16" Height="16"
                                             SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <Separator />
                                <MenuItem Header="{lex:LocText Neurotoxin.Godspeed.Shell:Resources:RenameTitle}" 
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.RenameTitleCommand}"
                                          CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType=ContextMenu}}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/rename.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                                <MenuItem Header="{Binding Path=Type, Converter={StaticResource ResxConverter}, ConverterParameter={x:Static constants:Strings.RenameFormat}}" 
                                          Command="{Binding Source={StaticResource ViewModel}, Path=Data.RenameFileSystemItemCommand}"
                                          CommandParameter="{Binding Path=PlacementTarget, RelativeSource={RelativeSource AncestorType=ContextMenu}}">
                                    <MenuItem.Icon>
                                        <controls:GreyableImage Source="/Resources/rename.png" Width="16" Height="16" SnapsToDevicePixels="True" />
                                    </MenuItem.Icon>
                                </MenuItem>
                            </ContextMenu>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="DataGridRow">
                                <Grid>
                                    <DataGridCellsPresenter />
                                    <Rectangle StrokeThickness="1" Stroke="Black" StrokeDashArray="1 2" SnapsToDevicePixels="true" Opacity="0" x:Name="Focus" />
                                </Grid>
                                <ControlTemplate.Triggers>
                                    <MultiDataTrigger>
                                        <MultiDataTrigger.Conditions>
                                            <Condition Binding="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsSelected}" Value="True" />
                                            <Condition Binding="{Binding ElementName=Grid, Path=DataContext.IsActive}" Value="True" />
                                            <Condition Binding="{Binding ElementName=Grid, Path=DataContext.IsInEditMode}" Value="False" />
                                        </MultiDataTrigger.Conditions>
                                        <Setter TargetName="Focus" Property="Opacity" Value="1" />
                                    </MultiDataTrigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </DataGrid.RowStyle>            
            <DataGrid.CellStyle>
                <Style TargetType="DataGridCell">
                    <Style.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter Property="Background" Value="Transparent" />
                            <Setter Property="Foreground" Value="Black" />
                        </Trigger>
                    </Style.Triggers>
                    <Setter Property="FocusVisualStyle">
                        <Setter.Value>
                            <Style>
                                <Setter Property="Control.Template">
                                    <Setter.Value>
                                        <ControlTemplate />
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="DataGridCell">
                                <Grid Name="Root" Background="{TemplateBinding Background}">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>

                                    <ContentPresenter Content="{TemplateBinding Content}" 
                                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                                      HorizontalAlignment="{TemplateBinding HorizontalAlignment}" 
                                                      VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                                      Margin="{TemplateBinding Padding}" />
                                    <Rectangle Name="RightGridLine" Grid.Column="1" VerticalAlignment="Stretch" Width="1" />
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </DataGrid.CellStyle>
            <e:Interaction.Triggers>
                <e:EventTrigger EventName="MouseUp">
                    <inf:MapMouseEventToCommand Command="{Binding SetActiveCommand}" />
                </e:EventTrigger>
                <e:EventTrigger EventName="PreviewMouseDown">
                    <inf:MapMouseEventToCommand Command="{Binding MouseSelectionCommand}" />
                </e:EventTrigger>
                <e:EventTrigger EventName="MouseDoubleClick">
                    <inf:MapMouseEventToCommand Command="{Binding ChangeDirectoryCommand}" />
                </e:EventTrigger>
                <e:EventTrigger EventName="PreviewKeyDown">
                    <inf:MapKeyboardEventToCommand Command="{Binding ChangeDirectoryCommand}" />
                </e:EventTrigger>
                <e:EventTrigger EventName="Sorting">
                    <inf:MapDataGridSortingEventToCommand Command="{Binding SortingCommand}" />
                </e:EventTrigger>
            </e:Interaction.Triggers>
            <DataGrid.InputBindings>
                <KeyBinding Command="{Binding ToggleSelectionCommand}" CommandParameter="{StaticResource Insert}" Key="Insert" />
                <KeyBinding Command="{Binding ToggleSelectionCommand}" CommandParameter="{StaticResource Space}" Key="Space" />
                <KeyBinding Command="{Binding ToggleSelectionCommand}" CommandParameter="{StaticResource ShiftDown}" Key="Down" Modifiers="Shift" />
                <KeyBinding Command="{Binding ToggleSelectionCommand}" CommandParameter="{StaticResource ShiftUp}" Key="Up" Modifiers="Shift" />
                <KeyBinding Command="{Binding CalculateSizeCommand}" CommandParameter="{StaticResource True}" Key="Enter" Modifiers="Shift+Alt" />
                <KeyBinding Command="{Binding SelectAllCommand}" Key="A" Modifiers="Control" />
                <KeyBinding Command="{Binding GoToFirstCommand}" CommandParameter="{StaticResource False}" Key="Home" />
                <KeyBinding Command="{Binding GoToFirstCommand}" CommandParameter="{StaticResource True}" Key="Home" Modifiers="Shift" />
                <KeyBinding Command="{Binding GoToLastCommand}" CommandParameter="{StaticResource False}" Key="End" />
                <KeyBinding Command="{Binding GoToLastCommand}" CommandParameter="{StaticResource True}" Key="End" Modifiers="Shift" />
                <KeyBinding Command="{Binding RenameTitleCommand}" CommandParameter="{Binding ElementName=Grid}" Key="F6" Modifiers="Shift" />
                <KeyBinding Command="{Binding RenameFileSystemItemCommand}" CommandParameter="{Binding ElementName=Grid}" Key="F6" Modifiers="Ctrl+Shift" />
                <KeyBinding Command="{Binding RefreshCommand}" Key="R" Modifiers="Control" />
                <KeyBinding Command="{Binding InvertSelectionCommand}" Key="Multiply" />
                <KeyBinding Command="{Binding UpCommand}" Key="Back" />
                <KeyBinding Command="{Binding CancelCommand}" Key="Escape" />
                <KeyBinding Command="{Binding LaunchCommand}" Key="Enter" Modifiers="Control"/>
            </DataGrid.InputBindings>
        </DataGrid>

        <vc:ProgressNotificationBar Grid.Row="2" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
        
        <TextBlock Text="{Binding SizeInfo}" Padding="2" Grid.Row="3" />
    </Grid>
</UserControl>